/**
 *   类说明
 * 
 *   @creator         xldc	497937995@qq.com  
 *   @create-time     2014年1月20日   下午6:23:20   
 */
package com.huacheng.cms.action.admin;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.huacheng.cms.exception.BaseException;
import com.huacheng.cms.model.Article;
import com.huacheng.cms.model.Folder;
import com.huacheng.cms.model.vo.ArticleVo;

/**
 * @author 进入网站后台首页
 * 
 */

@Controller
@RequestMapping("/admin")
public class AdminAction extends AdminBaseAction {
	@RequestMapping(value = "/index.htm", method = RequestMethod.GET)
	public String login(ModelMap modelMap) throws BaseException {
		modelMap.put("articleCount", 0);
		modelMap.put("downloadCount", 0);
		modelMap.put("userCount", 0);
		modelMap.put("folderAll", folderService.getListByObj(new Folder(), 0, 0));
		List<ArticleVo> articleList = articleService.getListByObj(new Article(), 0, 0);
		modelMap.put("articleList", articleList);
		return "system/index";
	}
}
